package com.kylin.common.core.exception;

import com.kylin.common.core.beans.ResultCode;
import com.kylin.common.core.beans.GlobalResultCode;

/**
 * 校验异常
 *
 * @author wuhao
 * @version 1.0 - 2019-02-11
 */
public class CheckException extends BaseException {

    public static final String CHECK_NOT_NULL = "缺少必填参数";
    public static final String CHECK_DATA_REPEAT = "数据不能重复";
    public static final String CHECK_INCORRECT_FORMAT = "参数格式不正确";

    public CheckException() {
        super(GlobalResultCode.BAD_REQUEST);
    }

    public CheckException(String message) {
        super(GlobalResultCode.BAD_REQUEST.getCode(), message);
    }

    public CheckException(ResultCode resultCode) {
        super(resultCode);
    }
}
